package com.etong.citymap.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

public class ContactBean implements Parcelable {
	private String id;
	private String name;
	private String type;
	private ArrayList<String> phone;
	private boolean isSelect = false;



	public ContactBean(String id, String name, String type,
			ArrayList<String> phone, boolean isSelect) {
		super();
		this.id = id;
		this.name = name;
		this.type = type;
		this.phone = phone;
		this.isSelect = isSelect;
	}

	public String getId() {
		return id;
	}

	public boolean isSelect() {
		return isSelect;
	}

	public void setSelect(boolean isSelect) {
		this.isSelect = isSelect;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public ArrayList<String> getPhone() {
		return phone;
	}

	public void setPhone(ArrayList<String> phone) {
		this.phone = phone;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(type);
		dest.writeString(name);
		dest.writeStringList(phone);
		dest.writeByte((byte)(isSelect?1:0));
	}

	public static final Creator<ContactBean> CREATOR = new Creator<ContactBean>() {

		@Override
		public ContactBean[] newArray(int size) {
			return new  ContactBean[size];
		}

		@Override
		public ContactBean createFromParcel(Parcel source) {
			return new ContactBean(source.readString(),source.readString(), source.readString()	, source.readArrayList(ArrayList.class.getClassLoader()),(source.readByte()==1?true:false));
		}
	};

}
